class CreatePaymentTypes < ActiveRecord::Migration
  def self.up
    create_table :payment_types do |t|
      t.string :payment_type            ,:limit => 16
      t.integer :is_locked              ,:limit => 1 ,:default => 0 #是否管理会要锁定 1为True 0为False
      t.timestamps
    end
    PaymentType.create(:payment_type =>'支票')
    PaymentType.create(:payment_type =>'欠条')
    PaymentType.create(:payment_type =>'转帐')
    PaymentType.create(:payment_type =>'刷卡')
    PaymentType.create(:payment_type =>'现金')
  end
  
  def self.down
    drop_table :payment_types
  end
end
